import { defineStore } from 'pinia'

export const useUserStore = defineStore(
  'userStore',
  {
    state: () => ({
      token: '',
      userInfo: {},
    }),
    actions: {
      setToken(token) {
        this.token = token
      },
      setUserInfo(userInfo) {
        this.userInfo = userInfo
      },
    },
    persist: true
  },

)
